import { ActionTypeEnum } from "@/enums/actionTypeEnum";
import { ref } from "vue";
export const useRoleModal = () => {
  const showRoleModal = ref<boolean>(false);
  const roleModalTitle = ref<string>("");
  const roleModalConfirmLoading = ref<boolean>(false);
  const roleDetail = ref<any>({});
  const actionType = ref<ActionTypeEnum>(ActionTypeEnum.ADD);

  const handleToggleShowRoleModal = (payload: boolean) => {
    showRoleModal.value = payload;
  };

  return {
    showRoleModal,
    roleModalTitle,
    roleModalConfirmLoading,
    actionType,
    roleDetail,
    handleToggleShowRoleModal,
  };
};
